<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>变量和常量</title>
</head>
<body>

</body>
<script>
    // 定义局部变量
    let name = "张三";
    let age = 23;
    document.write(name + "," +age + "<br>");

    // 定义全局变量
    {
        let l1 = "aa";
        l2 = "bb";
    }
    // document.write(l1);
    document.write(l2 + "<br>");

    // 定义常量
    const PI = 3.1415926;
    // PI = 3.15;
    document.write(PI);
</script>
</html>